home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / nihcl-30.lha / nihcl-3.0 / doc / install.tr < prev    next >
Text File  |  1990-05-25  |  22KB  |  1,153 lines

  1. .ig
  2.     A complete rewrite of the texttroff macro package.
  3.     It would be loosely modelled after the -ms macros
  4.  
  5.     main concept is to separate the elements of the page,
  6.     so a trap for the footer and a trap for the header separatly
  7.  
  8.     Also all default values are in well known registers,
  9.     initialized by the .IZ macro
  10. ..
  11. .\"
  12. .    \" IZ - initialize. Provide some default settings
  13. .de IZ
  14. .nr PS \n(.p    \" pointsize
  15. .nr VS \n(.v    \" linespacing
  16. .nr HM 1i    \" header margin
  17. .nr FM 1i    \" footer margin
  18. .nr LL \n(.l    \" line length
  19. .nr IN 36p    \" indent to allow outdenting headers
  20. .nr LT \n(.l-\n(INu    \" title length
  21. .\" trap setting
  22. .\"
  23. .\" for the top of page
  24. .wh 0 NP
  25. .\" for dealing with footnotes
  26. .wh 14i FO    \" footer trap, temp position
  27. .    \" to process footnote overflow, we fire this trap
  28. .    \" the trap for FO will be moved way up so we will fire
  29. .    \" this one when FO is putting the footnote out
  30. .wh -\\n(FMu Fx
  31. .    \" Now install FO on top of this position so it
  32. .    \" will be fired when no footnote needs to be processed
  33. .ch -\\n(FMu FO
  34. .\" for the bottom tittle
  35. .wh -\\n(FMu/2u BT
  36. ..
  37. .\"
  38. .    \" TA - set tabstops
  39. .de TA
  40. .ta \\n(ENu +\\n(ENu +\\n(ENu +\\n(ENu +\\n(ENu +\\n(ENu +\\n(ENu +\\n(ENu +\\n(ENu +\\n(ENu +\\n(ENu +\\n(ENu
  41. ..
  42. .\"
  43. .    \" RS - Reset.    Bring troff into a known state
  44. .de RS
  45. .ps \\n(PS
  46. .vs \\n(VSu
  47. .ll \\n(LLu
  48. .lt \\n(LTu
  49. .in \\n(INu
  50. .po \\n(POu
  51. .nr FS \\n(VSu/4u    \" footnote separation
  52. .nr F 0 1        \" for footnote numbering
  53. .ev 1
  54. .    \" where footnotes are processed
  55. .ps \\n(PS-2
  56. .vs (\\n(VSu-2p)u
  57. .ll \\n(LLu-\\n(INu
  58. .ev
  59. .ev 2
  60. .    \" where the table of contents is stored
  61. .ps \\n(PS
  62. .vs \\n(VSu
  63. .ev
  64. .TA
  65. ..
  66. .\"
  67. .    \" string for footnote numebering. Note that the increment takes place here
  68. .    \" note that Fn is defined in texttroff to get the body font
  69. .ds * \v'-.3v'\\*(Fn\s-3\\n+F\s0\fP\v'.3v'
  70. .ig
  71.     Running headers & footers.
  72.     These will be called from the header & footer macro
  73.     halfway the current margins in the macros PT & BT
  74.     Note that we don't use the page counter (%) directly.
  75.     We stick the value in register PN.
  76.     This allows for changing the format of the page number with
  77.     the .af request without screwing up troff
  78.  
  79.     We will enable the possibility to change on odd & even pages eventually
  80. ..
  81. .\"
  82. .    \" PT - Page Trap & Bottom Trap macro
  83. .de PT
  84. .if \\n(Tc=2 .br
  85. .po +\\n(INu
  86. .pc %
  87. .ie \\n(Tc=3 .nr PN \\n%-\\n(Pc
  88. .el .nr PN \\n%
  89. .nr Pn \\n%
  90. .if \\n(Pn>1 .if e .tl '\\*(LT'\\*(CT'\\*(RT'
  91. .if \\n(Pn>1 .if o .tl '\\*(RT'\\*(CT'\\*(LT'
  92. .po
  93. ..
  94. .    \" default footer string definitions 
  95. .po +\\n(INu
  96. .de BT
  97. .nr PF \\n(.f
  98. .nr PX \\n(.s
  99. .ft 1
  100. .ps \\n(PS
  101. .lt \\n(LTu
  102. .po +\\n(INu
  103. .if e .tl '\\*(LB'\\*(CB'\\*(RB'
  104. .if o .tl '\\*(RB'\\*(CB'\\*(LB'
  105. .ft \\n(PF
  106. .ps \\n(PX
  107. .po
  108. .if \\n(Tc=2 \{\
  109. .    nr Pc \\n%
  110. .    nr Tc 3
  111. .    af PN i
  112. .    TC
  113. .\}
  114. ..
  115. .    \" default header string definitions
  116. .ds CT - \\n(PN -
  117. .\"
  118. .\"
  119. .    \" NP - header macro
  120. .ig
  121.     print the header halfway the margins
  122.     only print when not on the first page
  123. ..
  124. .de NP
  125. .\".tm in NP page \\n% PO \\n(PO .o \\n(.o
  126. .nr PF \\n(.f
  127. .nr PX \\n(.s
  128. .ft 1
  129. .ps \\n(PS
  130. 'sp |\\n(HMu/2u
  131. .if !\\n%=0 .PT
  132. .ps \\n(PX
  133. .ft \\n(PF
  134. 'sp |\\n(HMu
  135. .nr Fc 0 1    \" init footnote count
  136. .nr Fp 0-\\n(HMu    \" current footer place
  137. .ch FO -\\n(HMu    \" reset footer trap
  138. .if \\n(dn .Fz    \" proces left over footnote
  139. .ns    \" no space mode
  140. ..
  141. .\"
  142. .    \" FO - footer macro
  143. .de FO
  144. .nr dn 0    \" zero last diversion size
  145. .if \\n(Fc \{\
  146. .    ev 1        \" expand footnotes in ev1
  147. .\".if '\\n(.z'Fy' .tm in overlow .i \\n(.i
  148. .in \\n(INu        \" set indentation to the one for the page
  149. .    nf        \" retain vertical size
  150. .    FN        \" dump the footnotes
  151. .            \" remove them; Don't put a comment on the next line
  152. .            \" with .rm, some troffs go into an infinite loop
  153. .    rm FN
  154. .\".if '\\n(.z'Fy' .tm in overlow .i \\n(.i
  155. .    if \\n(.zFy .di    \"end overflow diversion
  156. .    nr Fc 0        \" disable fx
  157. .    in 0        \" clear indentation
  158. .ev
  159. .\}
  160. .        \" pop environment
  161. 'bp
  162. ..
  163. ."
  164. .\"    Fx - process footnote overflow
  165. .\"
  166. .de Fx
  167. .if \\n(Fc \{\
  168. .    \" the foonote didn't fit so
  169. .di Fy    \" divert the overflow into Fy (we are still in env 1, so nofill mode)
  170. .    \" since we are in nofill mode and head indentation set,
  171. .in 0    \" set no indentation, so we don't indent twice
  172. .\}
  173. ..
  174. .\"
  175. .\"    FS - Footnote Start
  176. .de FS
  177. .da FN    \" divert (or append) footnote
  178. .ev 1    \" in environment 1
  179. .if \\n+(Fc=1 .FM    \" if first include seperator
  180. .fi    \" process in fill mode
  181. .if !\\n(Fo .FP    \" Footnote paragraph if not processing overflow
  182. ..
  183. .\"
  184. .    \" FP - footnote paragraph
  185. .de FP
  186. .sp \\n(FSu
  187. \v'-.3'\s-3\\nF\s0\v'.3'\|\c
  188. ..
  189. .\"
  190. .\"    FE - Footnote End
  191. .de FE
  192. .br        \" flush the output buffer
  193. .nr Sv \\n(.v    \" save baselinespacing of this env
  194. .ev        \" pop env
  195. .di        \" end the diversion
  196. .nr Fp -\\n(dn    \" new footer position
  197. .if \\n(Fc=1 .nr Fp -(\\n(.v-\\n(Sv)    \" For Separator
  198. .ch FO \\n(Fpu    \" change the trap, Fp is negative
  199. .    \" See whether the stuff really fits.
  200. .    \"if not change trap and we overflow
  201. .if (\\n(nl+1v)>(\\n(.p+\\n(Fp) .ch FO \\n(nlu+1v    \" it didn't fit,
  202. .    \" so fire the FO macro on the next line
  203. ..
  204. .\"
  205. .    \" FM - footnote separator one inch line
  206. .de FM
  207. \l'1i'
  208. .br
  209. ..
  210. .\"
  211. .\"    Fz - process footnote overflow
  212. .de Fz
  213. .nr Fo 1
  214. .FS
  215. .nf    \" is already processed, so keep size
  216. .Fy    \" where Fx put it
  217. .nr Fo 0
  218. .FE
  219. ..
  220. .\"
  221. .\"    HE - next thing will be a header
  222. .\" minimalistic widow control in HE macro.
  223. .\" We aks for a couple of lines with the .ne statement, will trigger the
  224. .\" bottom of page trap on the moment when there is no space 
  225. .de HE
  226. .ne 1.5i
  227. ..
  228. .\"
  229. .\"    IC - in table of contents
  230. .\"    $1 type of header $3 number, $2 text
  231. .\"
  232. .de IC
  233. .nr Tc 1    \"flag that we have a contents
  234. .ev 2
  235. .if !'\\$3'NO' \{\
  236. .    nr Tx \w'\\$3\0'u
  237. .    if \\n(Tx>\\n(Ta .nr Ta \\n(Tx
  238. .\}
  239. .nr Tp \w'\0\\n(PN'u
  240. .da Tc
  241. \\!.xx "\\$1" "\\$2" \\$3 \\n(PN
  242. .br
  243. .di
  244. .ev
  245. ..
  246. .\"
  247. .\"    An item in the table of contents
  248. .de xx
  249. .if \\$1=1 .sp .5
  250. .ie !'\\$3'NO' \\$3\t\\$2\a\t\\$4
  251. .el .ie \\n(Ta \&\t\\$2\a\t\\$4
  252. .el \&\\$2\a\t\\$4
  253. ..
  254. .\"    EM
  255. .\" check for work at end of file
  256. .de EM
  257. .if \\n(Tc \{\
  258. \c
  259. .nr Tc 2
  260. .\}
  261. .\"tm EM called, Tc: \\n(Tc
  262. ..
  263. .\" do the things we want at the end of the paper
  264. .de TC
  265. .\"tm TC called
  266. 'bp
  267. .ft B
  268. .\".tm tabel of contents
  269. .ce
  270. .rs
  271. .sp
  272. .ti -\\n(INu
  273. \s+2Table of Contents\s0
  274. .sp 2
  275. .ft R
  276. .nf
  277. .ev 2
  278. .    \" where the table of contents is stored
  279. .nf
  280. .nr Tb \\n(LLu-\\n(Tpu-\\n(INu
  281. .nr c \w'1.1.1.1\0'u
  282. .ie \\n(Ta .ta \\n(Tau \\n(Tbu \\n(LLu-\\n(INuR
  283. .el .ta \\n(Tbu \\n(LLu-\\n(INuR
  284. .in \\n(INu
  285. .Tc
  286. .ev
  287. ..
  288. .\"
  289. .\"    set end macro
  290. .em EM
  291. .\" in texttroff .IZ
  292. .\" in texttroff .RS
  293. .\"
  294. .\"
  295. .\"
  296. .\" Begin of the PSmacros, coutesy of fred hansen (I believe)
  297. .\"
  298. .nr zT 0
  299. .if  "\*(.T"postscript"  'nr zT 1
  300. .if  "\*(.T"psc"  'nr zT 1
  301. .de PB
  302. 'ne \\$2p
  303. 'nr zw \\n(.l-\\n(.k-1m-\\$1p
  304. 'nr zH \\n(.k
  305. 'nr zV \\n(.d
  306. 'if  \\n(zT  \\{\\
  307. 'ie  !\\n(zw  \\{\\
  308. 'nr zx \\n(.l-\\$1p-10m
  309. 'nr zV \\n(zV+1v
  310. .sp 0
  311. \\v'-.75v'\\ \\v'+.75v'\\c\\}
  312. 'el \\{\\
  313. 'nr zx \\n(zw-10m
  314. \\v'-.75v'\\ \\v'+.75v'\\c\\}
  315. .sp |\\n(zVu
  316. 'if ((\\n(zx<=0)&(\\$2p>0.75v)) \\x'\\$2p-0.75v'\\c
  317. \\!%
  318. \\!%!
  319. \\!  PB
  320. 'if \\n(.j=3 \\{\\
  321. \\!    /troffadjust { neg 2 idiv } def
  322. 'ss\\}
  323. 'if \\n(.j=5 \\{\\
  324. \\!    /troffadjust { neg } def
  325. 'ss\\}
  326. 'if \\n(.j<3 \\{\\
  327. \\!    /troffadjust { pop 0 } def
  328. 'ss\\}\\}
  329. ..
  330. .de PE
  331. 'if \\n(zT \\{\\
  332. \\!  PE
  333. \\!.
  334. 'ie \\n(zx \\{\\
  335. 'if (\\$2p>0.75v) \\x'\\$2p-0.75v'\\c
  336. \\h'-\\n(.ku+\\n(zHu+\\$1p'\\c\\}
  337. 'el  .br\\}
  338. 'if !\\n(zT \\{\\
  339. 'if  !\\n(zw  \\{\\
  340.  \\h'-\\n(.k'\\ \\h'-\\n(.w'\\c
  341. .sp -1\\}
  342. \\x'\\$2p-0.75v'\\v'-.75v'\\D'l \\$1p \
  343. 0.0i'\\D'l 0.0i \\$2p'\\D'l -\\$1p 0.0i'\\D'l 0.0i \
  344. -\\$2p'\\v'+.75v'\\h'\\$1p'\\c\\}
  345. ..
  346. .\"
  347. .\" End of PSmacros
  348. .\"
  349. .\"
  350. .\" ix macro for index production. 
  351. .\"
  352. .de ix
  353. .ie '\\n(.z'' .tm ix: \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9    \\n%
  354. .el \\!.ix \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9    \\n%
  355. ..
  356. .\"
  357. .\" End of ix macro
  358. .\"
  359. .IZ
  360. .nr IN 36p
  361. .nr LT 432p
  362. .nr PO 54p
  363. .br
  364. .ad b
  365. 'ft R
  366. .nr PS 12
  367. .ps \n(PS
  368. .nr VS 14p
  369. .vs \n(VSu
  370. .nr EN 8n
  371. .sp 0.5i
  372. .nr DP 0
  373. .ds Fn \fR
  374. .ds HF R
  375. .nr HS \n(.s
  376. .ds FF R
  377. .nr FS \n(.s
  378. .RS
  379. .nh
  380. .OC
  381. .ds Cl Installation
  382. .ll 6.75i
  383. .po .75i
  384. .nr Dr 1
  385. .nr DP 0
  386. .ds BU \s-2\(bu\s0
  387. .ds EM \(em
  388. .if\n(mo-0 .ds DT January
  389. .if\n(mo-1 .ds DT February
  390. .if\n(mo-2 .ds DT March
  391. .if\n(mo-3 .ds DT April
  392. .if\n(mo-4 .ds DT May
  393. .if\n(mo-5 .ds DT June
  394. .if\n(mo-6 .ds DT July
  395. .if\n(mo-7 .ds DT August
  396. .if\n(mo-8 .ds DT September
  397. .if\n(mo-9 .ds DT October
  398. .if\n(mo-10 .ds DT November
  399. .if\n(mo-11 .ds DT December
  400. .asDT " \n(dy, 19\n(yr
  401. .ds LT \*(Cl
  402. .ds CT NIH Class Library Revision 3.0
  403. .ds RT \*(Cl
  404. .ds LB Page \\n%
  405. .ds RB \*(DT
  406. .tl `\*(LT`\*(CT`\*(RT`
  407. .ps
  408. .ft P
  409. 'sp 0.3i
  410. .HE
  411. .br
  412. .ad l
  413. 'ft B
  414. .ps 14
  415. .OC
  416. .br
  417. .vs 16
  418. INTRODUCTION
  419. .ad b
  420. 'ft R
  421. .ps 12
  422. .OC
  423. .br
  424. .vs 14
  425. .TA
  426. .OC
  427. .sp 1
  428. This is the Installation Guide for the NIH Class Library (previously known as the 
  429. "OOPS" Class Library) Revision 3.0.
  430. .OC
  431. .sp 1
  432. The NIH Class Library is intended to be portable to a UNIX system compatible with 
  433. either System V or 4.2/4.3BSD and which supports the AT&T C++ translator Release 2.00, 
  434. Release 2.1, or other compatible C++ compiler.  We have ported and tested this library 
  435. on the following systems:
  436. 'in 72p
  437. 'll \n(.lu-(36p)
  438. .OC
  439. .sp 1
  440. Sun-3 with SunOS 3.5
  441. .OC
  442. .br
  443. Sun-3 with SunOS 4.0
  444. .OC
  445. .br
  446. Sun-4 with SunOS 4.0
  447. 'in 36p
  448. 'll \n(.lu-(-36p)
  449. .OC
  450. .sp 1
  451. Send comments to:
  452. 'in 72p
  453. 'll \n(.lu-(36p)
  454. .OC
  455. .sp 1
  456. Keith Gorlen
  457. .OC
  458. .br
  459. Building 12A, Room 2033
  460. .OC
  461. .br
  462. Computer Systems Laboratory
  463. .OC
  464. .br
  465. Division of Computer Research and Technology
  466. .OC
  467. .br
  468. National Institutes of Health
  469. .OC
  470. .br
  471. Bethesda, MD 20892
  472. .OC
  473. .sp 1
  474. phone: (301) 496-1111
  475. .OC
  476. .br
  477. Internet
  478. 'in 108p
  479. 'll \n(.lu-(36p)
  480. : kgorlen@alw.nih.gov
  481. 'in 72p
  482. 'll \n(.lu-(-36p)
  483. .OC
  484. .br
  485. uucp: uunet!nih-csl!kgorlen
  486. 'in 36p
  487. 'll \n(.lu-(-36p)
  488. .HE
  489. .br
  490. .ad l
  491. 'ft B
  492. .ps 14
  493. .OC
  494. .sp 2
  495. .vs 16
  496. GUIDE TO THIS DISTRIBUTION KIT
  497. .ad b
  498. 'ft R
  499. .ps 12
  500. .OC
  501. .sp 1
  502. .vs 14
  503. The NIH Class Library distribution kit consists of a main directory and the following 
  504. subdirectories:
  505. 'in 72p
  506. 'll \n(.lu-(36p)
  507. 'ft C
  508. .OC
  509. .sp 1
  510. errfac     \fRError Message Facility source files\fC
  511. .OC
  512. .br
  513. lib        \fRSource files for the basic library classes\fC
  514. .OC
  515. .br
  516. test       \fRTest suite for the basic library classes\fC
  517. .OC
  518. .br
  519. vector     \fRSource files for the Vector classes\fC
  520. .OC
  521. .br
  522. vectest    \fRTest suite for the Vector classes\fC
  523. .OC
  524. .br
  525. ex         \fRExample programs for the book
  526. 'in 36p
  527. 'll \n(.lu-(-36p)
  528. .OC
  529. .sp 1
  530. The main directory is refered to as \fCNIHCL\fR in the following discussion, but may be 
  531. placed anywhere.
  532. .OC
  533. .sp 1
  534. Most subdirectories have files named \fCMAKEFILE\fR and \fCMakefile\fR.  The \fCMAKEFILE\fR is used 
  535. by the installation procedure, and should work with both the System V and BSD version 
  536. of the \fCmake\fR utility.  The fancier \fCMakefile\fR is used for development, and may not work 
  537. under BSD.
  538. .HE
  539. .br
  540. .ad l
  541. 'ft B
  542. .ps 14
  543. .OC
  544. .sp 2
  545. .vs 16
  546. SUMMARY OF STEPS IN INSTALLING THE NIH CLASS LIBRARY
  547. .ad b
  548. 'ft R
  549. .ps 12
  550. 'in 109p
  551. .ti -46p
  552. .OC
  553. .sp 1
  554. .ti -46p
  555. .vs 14
  556. 1.    Update C++ system library and include files
  557. .OC
  558. .br
  559. .ti -46p
  560. 2.    Edit \fCNIHCL/Makefile\fR
  561. .OC
  562. .br
  563. .ti -46p
  564. 3.    Edit \fCNIHCL/lib/nihclconfig.h\fR
  565. .OC
  566. .br
  567. .ti -46p
  568. 4.    Build and install error message facility*
  569. .OC
  570. .br
  571. .ti -46p
  572. 5.    Build NIHCL basic classes, Vector classes, and test suite
  573. .OC
  574. .br
  575. .ti -46p
  576. 6.    Test basic classes and Vector classes
  577. .OC
  578. .br
  579. .ti -46p
  580. 7.    Build NIHCL basic classes, Vector classes, and test suite with multiple inheritance 
  581. support
  582. .OC
  583. .br
  584. .ti -46p
  585. 8.    Test basic classes and Vector classes with multiple inheritance support
  586. .OC
  587. .br
  588. .ti -46p
  589. 9.    Install class libraries*
  590. .OC
  591. .br
  592. .ti -46p
  593. 10.    Build example programs
  594. .OC
  595. .br
  596. .ti -46p
  597. 11.    Test example programs
  598. 'in 36p
  599. .ti +0p
  600. .OC
  601. .sp 1
  602. * root permission may be required
  603. .HE
  604. .br
  605. .ad l
  606. 'ft B
  607. .ps 14
  608. .OC
  609. .sp 3
  610. .vs 16
  611. INSTALLING THE NIH CLASS LIBRARY\fB
  612. .ps 12
  613. .HE
  614. .OC
  615. .sp 1
  616. .vs 14
  617. 1. Update C++ system library and include files
  618. .ad b
  619. 'ft R
  620. .OC
  621. .sp 1
  622. No updates to R2.00 of the AT&T C++ Translator are required.  However, if you are 
  623. using R2.1, be sure to make the changes documented in the section \fICOMPILING UNDER AT&T 
  624. C++ TRANSLATOR RELEASE 2.1\fR in the \fINIH Class Library Release Notes\fR.
  625. .HE
  626. .br
  627. .ad l
  628. 'ft B
  629. .OC
  630. .sp 1
  631. 2. Edit NIHCL/Makefile
  632. .ad b
  633. 'ft R
  634. .OC
  635. .sp 1
  636. Edit \fCNIHCL/Makefile\fR to change make variables as needed for your environment.  Here 
  637. are the settings shipped with the distribution kit:
  638. 'in 72p
  639. .br
  640. .ad l
  641. 'ft C
  642. .ps 10
  643. .OC
  644. .sp 1
  645. .vs 12
  646. # C++ compiler
  647. .OC
  648. .br
  649. CC = CC
  650. .OC
  651. .sp 1
  652. # C++ debug switch
  653. .OC
  654. .br
  655. CCDEBUG =
  656. .OC
  657. .br
  658. #CCDEBUG = -g
  659. .OC
  660. .sp 1
  661. # C++ flags
  662. .OC
  663. .br
  664. # NOTE: Disable +p option when compiling with AT&T R2.1 
  665. .OC
  666. .br
  667. #CCFLAGS = +p
  668. .OC
  669. .br
  670. #CCFLAGS =
  671. .OC
  672. .sp 1
  673. # C++ include files
  674. .OC
  675. .br
  676. I = /usr/include/CC
  677. .OC
  678. .sp 1
  679. # If using BSD
  680. .OC
  681. .br
  682. SYS = BSD
  683. .OC
  684. .br
  685. # If using System V
  686. .OC
  687. .br
  688. #SYS = SYSV
  689. .OC
  690. .sp 1
  691. # Compile with nested types
  692. .OC
  693. .br
  694. # (works with AT&T R2.1 and GNU C++)
  695. .OC
  696. .br
  697. NESTED_TYPES =
  698. .OC
  699. .br
  700. #NESTED_TYPES = -DNESTED_TYPES
  701. .OC
  702. .sp 1
  703. # Disable AT&T R2.0/R2.1 bug work-around code
  704. .OC
  705. .br
  706. BUGDEFS =
  707. .OC
  708. .br
  709. #BUGDEFS = -DBUG_bC2728 -DBUG_38 -DBUG_39 -DBUG_OPTYPECONST
  710. .OC
  711. .br
  712. # Defining BUG_TOOBIG disables code that 
  713. .OC
  714. .br
  715. # prevents C compiler "yacc stack overflows" error
  716. .OC
  717. .br
  718. #BUGDEFS = -DBUG_bC2728 -DBUG_38 -DBUG_39 -DBUG_OPTYPECONST -DBUG_TOOBIG
  719. .OC
  720. .sp 1
  721. # Enable debug code
  722. .OC
  723. .br
  724. DEBUGDEFS =
  725. .OC
  726. .br
  727. #DEBUGDEFS = -DDEBUG_OBJIO -DDEBUG_PROCESS
  728. .OC
  729. .sp 1
  730. # Flags for ln
  731. .OC
  732. .br
  733. #LNFLAGS =
  734. .OC
  735. .br
  736. LNFLAGS = -s
  737. .OC
  738. .sp 1
  739. # If using "patch"
  740. .OC
  741. .br
  742. MAIN = _main.c_p
  743. .OC
  744. .br
  745. # If using "munch"
  746. .OC
  747. .br
  748. #MAIN = _main.c_m
  749. .OC
  750. .sp 1
  751. # Target library for installation of Error Facility
  752. .OC
  753. .br
  754. LIB_ID = libC
  755. .OC
  756. .sp 1
  757. # Target Directories for Installation
  758. .OC
  759. .sp 1
  760. # directory for libnihcl.a
  761. .OC
  762. .br
  763. NIHCLLIBDIR = /usr/local/lib
  764. .OC
  765. .br
  766. # directory for NIHCL include files
  767. .OC
  768. .br
  769. NIHCLINCDIR = /usr/include/nihcl
  770. .OC
  771. .br
  772. # directory where ${LIB_ID}.a resides
  773. .OC
  774. .br
  775. CLIBDIR = /usr/local/lib/C++R2.0
  776. .OC
  777. .br
  778. # directory for errgen utility
  779. .OC
  780. .br
  781. ERRGENDIR = /usr/local/bin
  782. .OC
  783. .br
  784. # directory for errgen table file
  785. .OC
  786. .br
  787. ERRTABDIR = /usr/local/lib
  788. .OC
  789. .br
  790. # directory for errlib.h and errors.h
  791. .OC
  792. .br
  793. ERRINCDIR = $I\fC
  794. .ps 12
  795. 'in 36p
  796. .ad b
  797. 'ft R
  798. .HE
  799. .br
  800. .ad l
  801. 'ft B
  802. .OC
  803. .sp 2
  804. .vs 14
  805. 3. Edit NIHCL/lib files
  806. .ad b
  807. 'ft R
  808. .HE
  809. .br
  810. .ad l
  811. 'ft I
  812. .OC
  813. .sp 1
  814. 3.1 Edit \f(COnihclconfig.h
  815. .ad b
  816. 'ft R
  817. .OC
  818. .sp 1
  819. The NIH Class Library source is configured for your system by setting flags in \fCNIHCL/lib/nihclconfig.h\fR 
  820. which specify the machine model and operating system (UNIX variant).
  821. .OC
  822. .sp 1
  823. To configure the NIH Class Library for one of the not yet implemented options, at 
  824. least all of the parameters appearing in \fCnihclconfig.h\fR will have to be defined for 
  825. that option.
  826. .OC
  827. .sp 1
  828. The NIH Class Library should configure itself automatically for the following machines:
  829. 'in 72p
  830. 'll \n(.lu-(36p)
  831. .OC
  832. .sp 1
  833. sun/mc68000
  834. .OC
  835. .br
  836. sun/sparc
  837. 'in 36p
  838. 'll \n(.lu-(-36p)
  839. .OC
  840. .sp 1
  841. Classes \fCProcess\fR, \fCHeapProc\fR, \fCStackProc\fR, \fCScheduler\fR, \fCSemaphore\fR, and \fCSharedQueue\fR have some 
  842. machine-specific dependencies and will not work unless the \fCSETJMP()/LONGJMP()\fR functions 
  843. are properly defined.  See the \fINIH Class Library Release Notes\fR for directions on porting 
  844. the \fCProcess\fR classes.
  845. .HE
  846. .br
  847. .ad l
  848. 'ft I
  849. .OC
  850. .sp 1
  851. 3.2 Edit \f(COObject.h
  852. .ad b
  853. 'ft R
  854. .OC
  855. .sp 1
  856. The file \fCObject.h\fR defines three versions of a preprocessor macro named \fCSTRINGIZE\fR, 
  857. which forms some symbol names by concatenating the class name argument with other strings.  
  858. Each version does this a different way.  The version for use with ANSI C preprocessors, 
  859. conditionalized on the symbol \fC__STDC__\fR, uses \fC##\fR for concatenation.  If you are not 
  860. using an ANSI C preprocessor, defining the symbol \fCBS_NL\fR in \fCObject.h\fR selects the version 
  861. that uses the sequence \fC\\\fR<newline> as the concatenation separator, which seems to work 
  862. with most System V UNIX systems.  If you do not define \fCBS_NL\fR, you get the version of 
  863. DEFINE_CLASS that uses an empty comment sequence (\fC/**/\fR), which works with most Berkeley 
  864. UNIX systems.\fC
  865. .OC
  866. .sp 1
  867. Object.h\fR should require no editing on most systems.
  868. .HE
  869. .br
  870. .ad l
  871. 'ft B
  872. .OC
  873. .sp 1
  874. 4. Install error message facility
  875. .ad b
  876. 'ft R
  877. .OC
  878. .sp 1
  879. (Skip this step for MASSCOMP/RTU)
  880. 'in 72p
  881. .br
  882. .ad l
  883. 'ft C
  884. .OC
  885. .sp 1
  886. su     (if installing in protected directory)
  887. .OC
  888. .br
  889. make errorfacility
  890. 'in 36p
  891. .ad b
  892. 'ft R
  893. .OC
  894. .sp 1
  895. This builds an error message registery facility and error processing library similar 
  896. to \fCerrcom\fR and the 3E library routines on the MASSCOMP.
  897. .OC
  898. .sp 1
  899. The \fCerrgen\fR program reads a \fC.err\fR file to determine a facility name, and then reads 
  900. the file \fC${ERRTABDIR}/errgen_tab\fR to lookup the number assigned to that facility.  The 
  901. facility number determines the high-order bits of the error numbers which \fCerrgen\fR assigns, 
  902. assuring that error numbers used by different libraries do not coincide.  Errgen produces 
  903. a \fC.h\fR file containing error symbols and their assigned numbers, and a \fC.c\fR file containing 
  904. a table of error messages and formatting information.
  905. .OC
  906. .sp 1
  907. This step creates a module containing the error handling library routines named \fCerrors.o\fR 
  908. and adds it to \fC${CLIBDIR}/${LIB_ID}.a\fR, and it copies the files \fCerrlib.h\fR and \fCerrors.h\fR 
  909. into the directory \fC${ERRINCDIR}.\fR
  910. .OC
  911. .sp 1
  912. The test program testerr on \fCNIHCL/errfac\fR verifies that the error facilities have been 
  913. built correctly.  It returns the first and last error defined in the file \fCtesterrs.err\fR.
  914. .HE
  915. .br
  916. .ad l
  917. 'ft B
  918. .OC
  919. .sp 2
  920. 5. Build the NIH Class Library, Vector classes, and test suite
  921. .ad b
  922. 'ft R
  923. 'in 72p
  924. .br
  925. .ad l
  926. 'ft C
  927. .OC
  928. .sp 1
  929. make
  930. 'in 36p
  931. .ad b
  932. 'ft R
  933. .HE
  934. .br
  935. .ad l
  936. 'ft B
  937. .OC
  938. .sp 2
  939. 6. Test the NIH Class Library
  940. .ad b
  941. 'ft R
  942. 'in 72p
  943. .br
  944. .ad l
  945. 'ft C
  946. .OC
  947. .sp 1
  948. make verify
  949. 'in 36p
  950. .ad b
  951. 'ft R
  952. .OC
  953. .sp 1
  954. This runs the test suite and compares the output of each test program with the contents 
  955. of a \fC.v\fR file containing the correct output.  If the program runs correctly, you'll 
  956. see the message "No differences encountered".  Some tests such as \fCdate\fR, \fCidentdict\fR, \fC
  957. process\fR, \fCrandom\fR, \fCstack\fR, and \fCtim\fR produce output to the terminal.  \fCdate\fR outputs yesterday's, 
  958. today's, and tomorrow's date.  \fCidentdict\fR dumps an identity dictionary.  \fCrandom\fR prints 
  959. out a list of random numbers.  \fCstack\fR prints out a \fCCLTNEMPTY\fR error message to test error 
  960. reporting, and \fCtim\fR prints out the current date and time.
  961. .OC
  962. .sp 1
  963. The \fCerror\fR test program frequently fails to compare because its output depends upon 
  964. memory addresses that change from implementation to implementation.  \fCerror\fR should differ 
  965. only in the object address printed in the \fCCLTNEMPTY\fR error message.
  966. .OC
  967. .sp 1
  968. The output of \fCfdset\fR depends upon the maximum number of allowable file descriptors 
  969. on your system.  The test output was generated under SunOS 4.0, which has a limit of 
  970. 64 file descriptors.
  971. .OC
  972. .sp 1
  973. Several tests that print floating point numbers may fail to compare due to formatting 
  974. differences.
  975. .OC
  976. .sp 1
  977. The byte size of the object printed by ex8-1 may vary for different systems.  The 
  978. test output was produced by a Sun-3.
  979. .HE
  980. .br
  981. .ad l
  982. 'ft B
  983. .OC
  984. .sp 2
  985. 7. Build the NIH Class Library, Vector classes, and test suite with multiple inheritance 
  986. support
  987. .ad b
  988. 'ft R
  989. 'in 72p
  990. .br
  991. .ad l
  992. 'ft C
  993. .OC
  994. .sp 1
  995. make cleantest
  996. .OC
  997. .br
  998. make mi
  999. 'in 36p
  1000. .ad b
  1001. 'ft R
  1002. .HE
  1003. .br
  1004. .ad l
  1005. 'ft B
  1006. .OC
  1007. .sp 2
  1008. 8. Test the NIH Class Library, Vector classes, and test suite with multiple inheritance 
  1009. support
  1010. .ad b
  1011. 'ft R
  1012. 'in 72p
  1013. .br
  1014. .ad l
  1015. 'ft C
  1016. .OC
  1017. .sp 1
  1018. make verify
  1019. 'in 36p
  1020. .ad b
  1021. 'ft R
  1022. .OC
  1023. .sp 1
  1024. This runs the same tests as in Step 6, with similar results.
  1025. .HE
  1026. .br
  1027. .ad l
  1028. 'ft B
  1029. .OC
  1030. .sp 2
  1031. 9. Install the NIH Class Libraries
  1032. .ad b
  1033. 'ft R
  1034. 'in 72p
  1035. .br
  1036. .ad l
  1037. 'ft C
  1038. .OC
  1039. .sp 1
  1040. su     (if installing in protected directory)
  1041. .OC
  1042. .br
  1043. make install
  1044. 'in 36p
  1045. .ad b
  1046. 'ft R
  1047. .OC
  1048. .sp 1
  1049. The NIH Class Library archives \fClibnihcl.a\fR, \fClibnihclmi.a\fR, \fClibnihclvec.a\fR, and \fClibnihclvecmi.a\fR 
  1050. are copied to \fC${NIHCLLIBDIR}\fR and \fCranlib\fR is executed on the libraries.  All header files 
  1051. for basic classes are copied to directory \fC${NIHCLINCDIR}\fR.
  1052. .HE
  1053. .br
  1054. .ad l
  1055. 'ft B
  1056. .OC
  1057. .sp 2
  1058. 10. Build example programs
  1059. .ad b
  1060. 'ft R
  1061. 'in 72p
  1062. .br
  1063. .ad l
  1064. 'ft C
  1065. .OC
  1066. .sp 1
  1067. make examples
  1068. 'in 36p
  1069. .ad b
  1070. 'ft R
  1071. .HE
  1072. .br
  1073. .ad l
  1074. 'ft B
  1075. .OC
  1076. .sp 2
  1077. 11. Test example programs
  1078. .ad b
  1079. 'ft R
  1080. 'in 72p
  1081. .br
  1082. .ad l
  1083. 'ft C
  1084. .OC
  1085. .sp 1
  1086. make exverify
  1087. 'in 36p
  1088. .ad b
  1089. 'ft R
  1090. .HE
  1091. .br
  1092. .ad l
  1093. 'ft B
  1094. .ps 14
  1095. .OC
  1096. .sp 2
  1097. .vs 16
  1098. TROUBLE SHOOTING
  1099. .ad b
  1100. 'ft R
  1101. .ps 12
  1102. .HE
  1103. .br
  1104. .ad l
  1105. 'ft B
  1106. .OC
  1107. .sp 1
  1108. .vs 14
  1109. YACC stack overflows
  1110. .ad b
  1111. 'ft R
  1112. .OC
  1113. .sp 1
  1114. Some test programs may fail to compile because they are too complicated for your C 
  1115. compiler and get a "yacc stack overflow".  Either increase the table space in your 
  1116. C compiler or simplify the program by breaking it up into separate functions.  The 
  1117. inline copy constructors that Release 2.0 automatically generates are frequently the 
  1118. source of this error.  Explicitly defining non-inline copy constructors solves the 
  1119. problem.  See the \fIRelease Notes\fR for further details.
  1120. .HE
  1121. .br
  1122. .ad l
  1123. 'ft B
  1124. .OC
  1125. .sp 1
  1126. Problems with class Exception
  1127. .ad b
  1128. 'ft R
  1129. .OC
  1130. .sp 1
  1131. Test programs error and except test class \fCException\fR, the the NIH Class Library exception 
  1132. handler. If these programs fail to perform correctly suspicion can be directed to the 
  1133. performance of system functions \fCsetjmp()\fR and \fClongjmp()\fR.
  1134. .HE
  1135. .br
  1136. .ad l
  1137. 'ft B
  1138. .OC
  1139. .sp 1
  1140. Problems with Process classes
  1141. .ad b
  1142. 'ft R
  1143. .OC
  1144. .sp 1
  1145. Progams \fCprocess\fR and \fCstackproc\fR test the NIH Class Library co-routine mechanism (classes \fC
  1146. Process\fR, \fCHeapProc\fR, \fCStackProc\fR, and \fCScheduler\fR), the object queue (class \fCSharedQueue\fR) 
  1147. and semaphore (class \fCSemaphore\fR).  These are machine-dependent and rely on the presence 
  1148. of \fCalloca()\fR, which all systems do not provide, and on \fCsetjmp()\fR/\fClongjmp()\fR being implemented 
  1149. by saving/restoring all machine registers, which is not always the case for all systems 
  1150. either.  If the \fCprocess\fR or \fCstackproc\fR tests fail to compile, link, or run, check your 
  1151. system's implementations of \fCalloca()\fR \fCsetjmp()\fR, and \fClongjmp()\fR -- you may need to implement 
  1152. your own versions.
  1153.